<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <title>Document</title>
</head>
<body>
    <ul>
        <li class="li1">第1个li</li>
        <li class="li2">第2个li</li>
        <li class="li3">第3个li</li>
        <li class="li4">第4个li</li>
        <li class="li5">第5个li</li>
        <li class="li6">第6个li</li>
        <li class="li7">第7个li</li>
        <li class="li8">第8个li</li>
        <li class="li9">第9个li</li>
    </ul>
    <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
    <script>
        //var li5=$(".li5");
        //补充代码
       // var li6 = li5.nextUntil('.li7');
        //li6[0].innerHTML = '我被改变了'
        // console.log(li6);
       // var li4 = li5.prev('.li4');
       // console.log(li4)
       var arr = []
       $(function(){
            ($('li').each(function(index, domElement){
                arr.push(this.innerText)
            }))
            console.log(arr);
       });

    </script>
</body>
</html>